import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

const store = new Vuex.Store({
    state: {
        title: 'ztools',
        desp: '工具网站',
        help: '帮助',
        helpVisible: false,
    },
    mutations: {
        setHeader(state, obj) {
            state.desp = obj.desp;
            state.title = obj.title;
            state.help = obj.help;
        },
        showHelp(state) {
            state.helpVisible = true;
        },
        hideHelp(state) {
            state.helpVisible = false;
        },
    },
});

export default store;
